Skip to content

Give every button a semibold label and a solid focus ring - #2629

Open
yasell wants to merge 5 commits into
CopilotKit:mainfrom
yasell:redesign/base-components
Open

yasell wants to merge 5 commits into
CopilotKit:mainfrom
yasell:redesign/base-components

Conversation

@yasell

@yasell yasell commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Every button in the web app gets a semibold label and a keyboard focus ring that can be seen. Its
corner stays the control's, rounded-md, which follows --radius, as the UI kit now draws it. This
changes the button primitive (app/src/components/ui/button.tsx). Fields, menus and the other
controls stay as they are.

Buttons

  • Semibold labels. 600 instead of 500, in every variant and size. Figtree is loaded as a
    variable font, so the weight is drawn, not synthesized. Onboarding's buttons set the weight and
    size themselves and no longer need to.
  • A focus ring that can be seen. Keyboard focus was ring-ring/50: 1.75:1 against the page in
    light and 2.66:1 in dark, under the 3:1 a focus indicator needs. destructive faded it further,
    to ring-destructive/20. It is now a solid 4px ring in --ring on every variant: the border
    turns ring and 3px more is drawn outside. That is 3.37:1 on the page in light, 7.12:1 in dark,
    and at least 3.03:1 on every surface a button stands on. It is drawn outside the button, not
    inside: inside, it would be read against the fill, at 2.31:1 on the dark theme's primary and
    2.83:1 on the light theme's destructive tint.
  • A split button draws as one control. xs, sm, icon-xs and icon-sm carried
    in-data-[slot=button-group]:rounded-md, from shadcn's ButtonGroup, which this app doesn't
    have. In the one data-slot="button-group" here, Send to Bot in an artifact's comments, it put
    back the corners the two halves square off (rounded-r-none, rounded-l-none), so they drew as
    two rounded boxes. Without it, they read as one button.
  • Unchanged: corners, sizes, colors, hover, disabled (opacity-50) and pressed (the button
    scales to 0.97, as in main).

The browser extension and the components the artifact kit exports draw with the same primitive and
change with it. OpenDuet and OpenFuse keep their pill buttons, which they draw through data-slot.
OpenBot Desktop's setup window draws its own buttons and is unchanged.

Rules and tests

  • docs/design-system.md: focus is a ring in ring, and a button's is solid; a button's label is
    semibold and its focus ring drawn outside it, with a control's corner. A variant or a size keeps
    its size, colors and corners.
  • docs/app-guidelines.md, The look: a button's label is semibold.
  • app/tests/ui-primitives-look.test.ts: the button keeps the controls' check (rounded-md, never
    rounded-lg) and gains three: rounded-md is its one corner at every size, so a split button
    keeps its squared sides; its label is font-semibold; and its focus is ring-ring, with no faded
    ring and no ring in a variant's color.
  • tokens/tests/contrast.test.ts: the ring is also held at 3:1 on popover and muted, where
    buttons stand in dialogs and on filled rows.

Looked at

At 1440×900 at 2x, in light and dark, before and after: Vault → New credential, API keys → Create
key (the dialog, and keyboard focus on Create key and on Cancel), and Activity's filters. In a
gallery of the real components: every variant in every state, the focus ring on the page, on a card
and on a muted fill, and buttons as screens place them. In each pair, main is on the left and
this change on the right.

Every variant in every state, light.

gallery-variants-states-light

Every variant in every state, dark.

gallery-variants-states-dark

Keyboard focus on the page, on a card and on a muted fill.

gallery-focus-placement-light

Buttons as screens place them, Send to Bot split button included.

gallery-in-context-light

API keys, Create key dialog.

07-dialog-light

Keyboard focus on Create key, light.

13-focus-dialog-light

Keyboard focus on Create key, dark.

13-focus-dialog-dark

Keyboard focus on Cancel.

14-focus-dialog-cancel-light

Vault, New credential.

06-settings-subpage-light

Activity's filters.

09-activity-filters-light

bun run typecheck, Biome's lint and format on the changed files, the look, look guard and
contrast tests, and the tests that draw a button (in Chromium and WebKit for the browser ones) pass.

yasell and others added 2 commits December 1, 2026 17:42
Every variant and size of the button primitive is rounded-full, icon
buttons are circles, and labels are semibold. Keyboard focus is a solid
ring in --ring on every variant, drawn outside the button: the faded
ring-ring/50 was 1.75:1 against the page in light, under the 3:1 a focus
indicator needs.

The button-group corner overrides go, which also lets Send to Bot's split
button draw as one control. Onboarding, the carousel and InputGroupButton
stop drawing corners of their own. The design-system rules, the look
tests and the contrast test change with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The other controls keep their ring for now, so the token rule names the
button's solid ring as its own instead of stating it for all of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yasell yasell changed the title Unify buttons, fields, menus, and other base components across themes Make every button a pill, with semibold labels and a solid focus ring Dec 1, 2026
@yasell
yasell marked this pull request as ready for review December 1, 2026 14:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	app/src/components/onboarding/onboarding-frame.tsx
#	app/src/components/ui/button.tsx
The UI kit now binds every button to --radius-md, so buttons go back from
rounded-full to rounded-md and follow --radius again. The semibold label
and the solid focus ring stay, and so does the split-button fix: no size
puts back the corners a button group squares off. Carousel arrows, the
input group's small buttons and onboarding's phone pills are as in main
again. The docs and ui-primitives-look.test.ts treat a button as a
control again, and the test now also holds its one corner and its
semibold label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yasell yasell changed the title Make every button a pill, with semibold labels and a solid focus ring Give every button a semibold label and a solid focus ring Dec 3, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant